package com.example.dao;

import org.springframework.data.mongodb.repository.MongoRepository;
import org.springframework.data.mongodb.repository.Query;

import java.util.List;

/**
 * Copyright © 2016年 author. All rights reserved.
 *
 * @Author 临江仙 hzqiuxm@163.com
 * @Date 2017/9/14 0014 16:46
 */
public interface PersonForMongDao extends MongoRepository<PersonForMongoDB,String> {

    PersonForMongoDB findByName(String name);

    @Query("{'age':?0}")
    List<PersonForMongoDB> withQueryFindByAge(Integer age);
}
